package com.mark.design.principle.openclose2;

/**
 * @Description:  《悲伤逆流成河》读书日折后价的计算实现
 * @Author: Kingsley
 * @CreateDate: 2018/11/25 18:54
 * @Version: 2.0
 * @Copyright : 豆浆油条个人非正式工作室
 * 扩展业务：计算打折后的价格
 * 不修改原来的接口和类
 * 通过继承实现
 */
public class CryMeASadRiverBookDisCountImpl extends   CryMeASadRiverBookImpl{

    public CryMeASadRiverBookDisCountImpl(String author, String bookName, double price) {
        super(author, bookName, price);
    }

    /**
     * 计算五折后的书本价格
     * @return ：折后价
     */
    public double queryDicountPrice() {
       return queryPrice()* 0.5;
    }
}
